import request from '@/utils/request'
// 获取分类列表
export const getCategory = params => request({
  params,
  url: '/categories'
})
// 获取分类数量
export const Classification = params => request({
  url: '/categories/count',
  params
})
// 新增
export const postCategories = data => request({
  url: '/categories',
  method: 'post',
  data
})
// 删除
export const delCategories = id => request({
  url: '/categories/' + id,
  method: 'delete'
})
// 获取指定分类
export const getCategories = id => request({
  url: '/categories/' + id
})
export const putCategories = data => request({
  url: '/categories/' + data.id,
  method: 'put',
  data
})
